#------------------------------------------------------------------------------
# Makefile
# 	Makefile for the wifi module 
# Author: Roel Postelmans
#------------------------------------------------------------------------------
CC = g++
CFLAGS  = -g -Wall
LIBS = -pthread 
EXTRA=-std=c++0x  -Wl,--no-as-needed 

all: wifimodule

debug: CFLAGS += -DDEBUG 
debug: wifimodule_debug

wifimodule_debug: Debug.o Buffer.o Server.o 
	$(CC) $(CFLAGS) -o wifimodule Debug.o Buffer.o Server.o $(LIBS) $(EXTRA)

wifimodule: Buffer.o Server.o 
	$(CC) $(CFLAGS) -o wifimodule Buffer.o Server.o $(LIBS) $(EXTRA)

Buffer.o:  Buffer.cpp buffer.h package.h server.h
	$(CC) $(CFLAGS)  -c Buffer.cpp $(LIBS) $(EXTRA)

Server.o:  Server.cpp server.h buffer.h package.h 
	$(CC) $(CFLAGS) $(LIBS) -c Server.cpp  $(LIBS) $(EXTRA)

Debug.o:  Debug.cpp server.h buffer.h package.h 
	$(CC) $(CFLAGS) $(LIBS) -c Debug.cpp  $(LIBS) $(EXTRA)
clean: 
	$(RM) count *.o *~
